<script type="text/javascript" src="http://www.infinitusmail.com/ar/js/jquery-latest.js"></script>
<script type="text/javascript" src="http://www.infinitusmail.com/ar/js/jquery.validate.js"></script>
<script type="text/javascript">
    //$(document).ready(function() {
      //$("#frmSuscripcion").validate({
        //rules: {
         // user_name: "required",
          //user_email:{required: true, email: true}
		//}
      //});
    //});
</script>

<style>
.csslabel
{
	float:left;
	width:75px;
}
.cssinput
{
	float:left;
	width:75px;
}
.csssubmit
{
}

.txtname
{
	border: none;
	border: 0;
	height:30px;
	font-size:18px;
}
.txtemail
{
	border: none;
	border: 0;
	height:30px;
	font-size:18px;
}

.txttext
{
	border: none;
	border: 0;
	height:65px;
	font-size:16px;
}

.cssbtnsubmit
{
}

.cssfila_user_name
{
	position:absolute;
	top :43px;
	left:320px;
}

.cssfila_user_email
{
	position:absolute;
	top :87px;
	left:320px;
}

.cssfila_user_text
{
	position:absolute;
	top :131px;
	left:320px;
}

.cssfila_btnSend
{
	position:absolute;
	top :200px;
	left:300px;
}

#show
{
	font-size:14px;
	position:absolute;
	top :235px;
	left:80px;
	height:20px;
	width:475px;
	color:Red;
	font-weight:bold;
}
</style>
<script type="text/javascript" src="http://localhost/wordpress/demo.com/js/prototype.js"></script>
<form name="frmSuscripcion" id="frmSuscripcion" onsubmit="return false;">
		<script>
			function sendRequest() {
				document.getElementById("show").innerHTML=document.getElementById("user_name").value+" por favor espera unos segundos....Gracias";

				new Ajax.Request("http://localhost/wordpress/demo.com/ar/suscriptor.php",
					{ 
					method: 'post', 
					postBody: 'user_name='+ $F('user_name')+'&user_email='+$F('user_email')+'&MM_idcampanna='+$F('MM_idcampanna')+'&MM_insert_suscriptor='+$('MM_insert_suscriptor')+'&MM_url_redirect_suscripcion_bienvenida='+$('MM_url_redirect_suscripcion_bienvenida')+'&MM_url_redirect_suscripcion_error='+$('MM_url_redirect_suscripcion_error'),
					onComplete: showResponse 
					});
				}

					//postBody: 'user_name='+ $F('user_name')+'&amp;user_email='+$F('user_email')+'&amp;MM_idcampanna='+$F('MM_idcampanna')+'&amp;MM_insert_suscriptor='+$('MM_insert_suscriptor')+'&amp;MM_url_redirect_suscripcion_bienvenida='+$('MM_url_redirect_suscripcion_bienvenida')+'&amp;MM_url_redirect_suscripcion_error='+$('MM_url_redirect_suscripcion_error'),

			function showResponse(req){
				$('show').innerHTML= req.responseText;
			}
		</script>

<h2>Deseo recibir informe especial</h2>

<div class="cssfila_user_name">
	<div class="cssinput"><span class="xinput"><input id="user_name" name="user_name" class="txtname" type="text" size="23" /></span></div>
</div>

<div class="cssfila_user_email">
	<div class="cssinput"><span class="xinput"><input id="user_email" name="user_email" class="txtemail" type="text" size="23" /></span></div>
</div>

<div class="cssfila_user_text">
	<div class="cssinput">
	<span class="xinput">
		<textarea name="TextMessage" rows="4" cols="29" id="user_text" name="user_text" class="txttext">consulta
cantidad:
tela:
gramaje:
color:
"Aqui puedes especificar mas detalles..."
</textarea>
	</span></div>
</div>

<input type="hidden" name="MM_idcampanna" value="1" />
<input type="hidden" name="MM_insert_suscriptor" value="frmSuscripcion" />
<input type="hidden" name="MM_url_redirect_suscripcion_bienvenida" value="" />
<input type="hidden" name="MM_url_redirect_suscripcion_error" value="" />

<div class="cssfila_btnSend">
<span class="art-button-wrapper">
	<span class="l"> </span>
	<span class="r"> </span>
	<input class="art-button" type="submit" value="Enviar Datos" onClick="sendRequest()">
</span>
</div>

<div id="show" class="mensajes"></div>

	<script language="JavaScript">
     // get the current URL
     var url = window.location.toString();
     //get the parameters
     url.match(/\?(.+)$/);
     var params = RegExp.$1;
     // split up the query string and store in an
     // associative array
     var params = params.split("&");
     var queryStringList = {};

	if(params.length>0){
		 for(var i=0;i<params.length;i++)
		 {
			var tmp = params[i].split("=");
			queryStringList[tmp[0]] = unescape(tmp[1]);
		 }

		 // print all querystring in key value pairs
		 for(var i in queryStringList){
			if(i=="msg_suscripcion"){
				document.getElementById("msg_suscripcion").innerHTML=queryStringList[i];
			}
		 }
	}
     </script>
</form>
